<template>
    <div class="grandChildClass">
        <h4>Grand child</h4>
        {{ name }} -- {{ price }}
    </div>
</template>

<script>
import { inject, toRefs } from 'vue';

export default {
    name: 'GrandChildComponent',
    setup() {
        const car = inject('car')
        return {
            ...toRefs(car)
        }
    }
}
</script>

<style>
.grandChildClass {
    background-color: aqua;
    padding: 10px;
}
</style>